﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
using Vsto = Microsoft.Office.Tools;

namespace HelloWorld
{
    public partial class BloggingRibbon : OfficeRibbon
    {
        public BloggingRibbon()
        {
            InitializeComponent();
        }

        private void BloggingRibbon_Load(object sender, RibbonUIEventArgs e)
        {

        }

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            BlogsManager manager = new BlogsManager();
            //manager.ShowDialog();
            manager.Show();
        }

        private void toggleButton1_Click(object sender, RibbonControlEventArgs e)
        {
            Vsto.CustomTaskPane myBlogsPane = Globals.ThisAddIn.CustomTaskPanes.Single(ctp => ctp.Title == "My Blogs");
            myBlogsPane.Visible = toggleButton1.Checked;
        }

    }
}
